<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/page/inc/taglib.jsp"%>
<div class="pageHeader">
	<form id="pagerForm" onsubmit="return navTabSearch(this);" action="${pageContext.request.contextPath}/investment/handover/list" method="post">
		<!-- 分页表单参数 -->
		<!-- 需要排序的字段 -->
		<input type="hidden" name="orderField" value="${requestScope.dwzPageBean.countResultMap.orderField}" />
		<!-- 正序倒序 -->
		<input type="hidden" name="orderDirection" value="${requestScope.dwzPageBean.countResultMap.orderDirection}" />
		<%@include file="/WEB-INF/page/inc/pageForm.jsp"%>
		<div class="searchBar">
			<table class="searchContent">
				<tr>
					<td>业主姓名： <input size="25" placeholder="请输入姓名" name="name" type="text" value="${requestScope.dwzPageBean.countResultMap.name}" />
					</td>

					<td>联系电话： <input size="25" placeholder="请输入电话号码" name="phone" type="text" value="${requestScope.dwzPageBean.countResultMap.phone}" />
					</td>
					<td>客户来源： <input size="25" placeholder="请输入客户来源" name="source" type="text" value="${requestScope.dwzPageBean.countResultMap.source}" />
					</td>
					<td>店铺级别： <input size="25" placeholder="请输入店铺级别" name="stle" type="text" value="${requestScope.dwzPageBean.countResultMap.stle}" />
					</td>
					
					
					<%--<td><label style="width: 30px;">状态：</label> <select name="state" class="combox">
							<option value="">请选择</option>
							<option value="1" ${requestScope.dwzPageBean.countResultMap.state == 1?'selected':''}>申请移交</option>
							<option value="2" ${requestScope.dwzPageBean.countResultMap.state == 2?'selected':''}>移交通过</option>
							<option value="3" ${requestScope.dwzPageBean.countResultMap.state == 3?'selected':''}>移交不通过</option>
					</select></td>
					<td>添加时间：<input name="startTime" class="date textInput readonly" readonly="true" type="text" value="${requestScope.dwzPageBean.countResultMap.startTime}" placeholder="请选择添加时间" style="margin-right: 5px;">至<input style="margin-left: 5px;" name="endTime" class="date textInput readonly" readonly="true" minDate="" type="text" value="${requestScope.dwzPageBean.countResultMap.endTime}" placeholder="请选择添加时间"></td> --%>
				</tr>
				<tr>
					<td>签约时间：<input name="startTime" class="date textInput readonly" readonly="true" type="text" value="${requestScope.dwzPageBean.countResultMap.startTime}" placeholder="请选择开始时间" style="margin-right: 5px;">至<input style="margin-left: 5px;" name="endTime" class="date textInput readonly" readonly="true" minDate="" type="text" value="${requestScope.dwzPageBean.countResultMap.endTime}" placeholder="请选择结束时间"></td>
					<td>合同编号： <input size="25" placeholder="请输入合同编号" name="ctno" type="text" value="${requestScope.dwzPageBean.countResultMap.ctno}" />
					</td>
				</tr>
				<tr>
					<!-- 省市区联动查询 -->
					<td><label class="nowrap" style="width: 28px;">省：</label> <input type="hidden" name="areaName" class="required" value="${requestScope.record.areaName}" /> <select class="combox required" name="areaCode" id="inv_combox_province" ref="inv_combox_city" refUrl="${pageContext.request.contextPath}/system/areas/getCityByProvince?id={value}&isSearch=true" default-value="110000">
							<option value="">请选择</option>
							<c:forEach items="${requestScope.provinces}" var="item">
								<option value="${item.id}" ${item.id==requestScope.dwzPageBean.countResultMap.province?"selected":""}>${item.name}</option>
							</c:forEach>
					</select></td>
					<td><label class="nowrap" style="width: 30px;">市：</label><select class="combox required" name="areaCode" id="inv_combox_city" ref="inv_combox_region" refUrl="${pageContext.request.contextPath}/system/areas/getCountyByAreas?id={value}&isSearch=true" default-value="110100">
							<option value="">请选择</option>
							<c:forEach items="${requestScope.citys}" var="item">
								<option value="${item.id}" ${item.id==requestScope.dwzPageBean.countResultMap.city?"selected":""}>${item.name}</option>
							</c:forEach>
					</select></td>
					<td><label class="nowrap" style="width: 52px;">区：</label><select class="combox required" name="areaCode" id="inv_combox_region" default-value="110100">
							<option value="">请选择</option>
							<c:forEach items="${requestScope.countys}" var="item">
								<option value="${item.id}" ${item.id==requestScope.dwzPageBean.countResultMap.county?"selected":""}>${item.name}</option>
							</c:forEach>
					</select></td>
					<td>
						<ul>
							<li>
								<div class="buttonActive">
									<div class="buttonContent">
										<button type="submit">查询</button>
									</div>
								</div>
							</li>
						</ul>
					</td>
				</tr>
			</table>
			<!-- <div class="subBar">
				<ul>
					<li>
						<div class="buttonActive">
							<div class="buttonContent">
								<button type="submit">查询</button>
							</div>
						</div>
					</li>
				</ul>
			</div> -->
		</div>
	</form>
</div>
<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<shiro:hasPermission name="/investment/handover/export">
				<li><a href="${pageContext.request.contextPath}/investment/handover/export" target="dwzExport" targetType="navTab" title="是要导出这些记录吗?" class="icon"><span>导出EXCEL</span></a></li>
			</shiro:hasPermission>
			<shiro:hasPermission name="/investment/handover/toInsert">
				<li><a class="add" href="${pageContext.request.contextPath}/investment/handover/toInsert" rel="insert" target="dialog" mask="true" width="820" height="460"><span>添加</span></a></li>
			</shiro:hasPermission>
			<shiro:hasPermission name="/investment/handover/delete">
				<li><a class="delete" href="${pageContext.request.contextPath}/investment/handover/delete" rel="id" target="selectedTodo" title="确定要删除吗？" warn="请最小选择一条记录" mask="true"><span>批量删除</span></a></li>
			</shiro:hasPermission>
		</ul>
	</div>
	<table class="table" targetType="navTab" asc="asc" desc="desc" width="100%" layoutH="162">
		<thead>
			<tr>
				<th width="22"><input type="checkbox" group="id" class="checkboxCtrl"></th>
				<th orderField="imfid" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'imfid'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>业主姓名</th>
				<th orderField="phone" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'phone'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>联系电话</th>
				<th orderField="sgtm" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'sgtm'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>签约时间</th>
				<th orderField="source" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'source'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>客户来源</th>
				<th orderField="stle" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'stle'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>店铺级别</th>
				<th orderField="area_name" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'area_name'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>地区</th>
				<th orderField="imname" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'imname'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>招商经理</th>
				<th orderField="rgname" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'rgname'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>区域经理</th>
				<th orderField="opname" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'opname'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>运营督导</th>
				<th orderField="state" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'state'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>状态</th>
				<th orderField="ctno" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'ctno'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>合同编号</th>
				<th orderField="mrgn" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'mrgn'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>保证金</th>
				<th orderField="mgmt" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'mgmt'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>管理费</th>
				<th orderField="auth" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'auth'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>品牌授权费</th>
				<th orderField="rbmt" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'rbmt'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>报销费用</th>
<%-- 				<th orderField="age" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'age'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>年龄</th>
				<th orderField="cacr" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'cacr'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>业主性格</th>
				<th orderField="carr" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'carr'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>业主职业</th>
				<th orderField="optw" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'optw'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>经营方式</th>
				<th orderField="issp" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'issp'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>是否有店铺</th>
				<th orderField="addr" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'addr'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>地址</th> --%>
				<th>操作</th>
			</tr>
		</thead>
		<tbody>

			<c:if test="${requestScope.dwzPageBean != null &&  requestScope.dwzPageBean.recordList != null }">
				<c:forEach var="record" items="${requestScope.dwzPageBean.recordList}" varStatus="status">
					<tr ondblclick="openDetails(this)" target="navTab" href="${pageContext.request.contextPath}/investment/handover/details?id=${record.id}" title="详情">
						<td><input name="id" value="${record.id}" type="checkbox"></td>
						<td>${record.name}</td>
						<td>${record.phone}</td>
						<td><fmt:formatDate value="${record.sgtm}" pattern="yyyy-MM-dd" /></td>
						<td>${record.source}</td>
						<td>${record.stle}</td>
						<td>${record.areaName}</td>
						<td>${record.imname}</td>
						<td>${record.rgname}</td>
						<td>${record.opname}</td>
						<td>${record.state==1?'申请移交':''}${record.state==2?'移交通过':''}${record.state==3?'移交不通过':''}</td>
						<td>${record.ctno}</td>
						<td><nf:nfmt num="${record.mrgn}"/></td>
						<td><nf:nfmt num="${record.mgmt}"/></td>
						<td><nf:nfmt num="${record.auth}"/></td>
						<td><nf:nfmt num="${record.rbmt}"/></td>
					 	<%-- <td>${record.age}</td>
						<td>${record.cacr}</td>
						<td>${record.carr}</td>
						<td>${record.qq}</td>
						<td>${record.optw}</td>
						<td>${record.issp==0?'否':''}${record.issp==1?'是':''}</td>
						<td>${record.ftae}</td>
						<td>${record.isdw==0?'无':''}${record.isdw==1?'有':''}</td>
						<td><fmt:formatDate value="${record.dstm}" pattern="yyyy-MM-dd" /></td>
						<td><fmt:formatDate value="${record.eptm}" pattern="yyyy-MM-dd" /></td>
						<td>${record.addr}</td> 
						<td>${record.eptn}</td> --%>
						<td><shiro:hasPermission name="/investment/handover/details">
								<a title="详情" target="navTab" rel="${pageContext.request.contextPath}/investment/handover/details" href="${pageContext.request.contextPath}/investment/handover/details?id=${record.id}" class="editBtn" mask="true" width="820" height="460"><span>详情</span></a>
							</shiro:hasPermission> <shiro:hasPermission name="/investment/handover/toUpdate">
								<a title="编辑" target="dialog" href="${pageContext.request.contextPath}/investment/handover/toUpdate?id=${record.id}" class="editBtn" mask="true" width="820" height="460"><span>编辑</span></a>
							</shiro:hasPermission> <shiro:hasPermission name="/investment/handover/delete">
								<a title="确定要删除吗？" target="ajaxTodo" href="${pageContext.request.contextPath}/investment/handover/delete?id=${record.id}" class="deleteBtn" mask="true"><span>删除</span></a>
							</shiro:hasPermission> <shiro:hasPermission name="/investment/handover/toReview">
								<a title="审核" target="dialog" href="${pageContext.request.contextPath}/investment/handover/toReview?id=${record.id}" class="editBtn" mask="true" width="820" height="460"><span>审核</span></a>
							</shiro:hasPermission></td>

					</tr>
				</c:forEach>
			</c:if>

		</tbody>
	</table>
	<!-- 分页条 -->
	<%@include file="/WEB-INF/page/inc/pageBar.jsp"%>
</div>